package com.autonavi.yunda.yunji.core.vo.node;

import com.autonavi.yunda.yunji.core.enums.EdgeType;
import com.autonavi.yunda.yunji.core.enums.NodeType;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * @author cizhong.wcs
 * @date 2022/10/10 10:45
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class EdgeNode extends BaseNode {
    public String head;
    public String tail;
    public Boolean isDefault = false;
    public EdgeType type = EdgeType.nope;
    public String script;

    @Override
    public String getName() {
        return String.format("switcher_%s_%s", head, tail);
    }


    @Override
    public String getVar() {
        return String.format("switcher_%s_%s", head, tail);
    }

    @Override
    public NodeType getNodeType() {
        return NodeType.edge;
    }
}
